<template>
    <div class="from_detail_div">
        <el-form ref="form" :model="formValue" :rules="rules" :show-message="false" label-width="100px" :disabled="disabled">
            <el-form-item label="企业名称" prop="departmentName">
                <el-input style="width: 900px;" v-model="formValue.departmentName" disabled></el-input>
            </el-form-item>
            <el-form-item label="岗位信息" prop="postName">
                <el-input style="width: 900px;" v-model="formValue.postName" disabled></el-input>
            </el-form-item>
            <el-form-item label="岗位职责" prop="postExplain">
                <el-input style="width: 900px;" v-model="formValue.postExplain" type="textarea" rows="5"></el-input>
            </el-form-item>
            <el-form-item label="岗位要求" prop="recruitDemand">
                <el-input style="width: 900px;" v-model="formValue.recruitDemand" type="textarea" rows="5"></el-input>
            </el-form-item>
            <el-form-item label="招聘人数" prop="personNum">
                <el-input style="width: 900px;" v-model="formValue.personNum"></el-input>
            </el-form-item>
            <el-form-item label="截止日期" prop="expirationData">
                <el-date-picker style="width: 900px;" v-model="formValue.expirationData" type="date" value-format="yyyy-MM-dd"></el-date-picker>
            </el-form-item>
        </el-form>
    </div>
</template>

<script>

export default {
    name: "recruitApplyDetail",
    props: {
        formValue: {
            departmentId: String,
            departmentName: String,
            postName: String,
            postExplain: String,
            recruitDemand: String,
            personNum: Number,
            expirationData: String,
        },
        fieldStatus: Object,
        disabled: Boolean,
    },
    data() {
        return {
            loading: false,
            rules: {
                departmentName: [{required: true, message: '', trigger: 'change'}],
                postName: [{required: true, message: '', trigger: 'change'}],
                postExplain: [{required: true, message: '', trigger: 'change'}],
                recruitDemand: [{required: true, message: '', trigger: 'change'}],
                personNum: [{required: true, message: '', trigger: 'change'}],
                expirationData: [{required: true, message: '', trigger: 'change'}],
            },
            postList: [],
        }
    },
    methods: {
        selectInstitution(data) {
            this.$set(this.form, 'institutionId', data.value);
            this.$set(this.form, 'institutionName', data.label);
        },
        submit() {
        },
        resetForm() {
            this.$refs.form.resetFields();
            this.form = this.$options.data().form;
            this.formValue = this.$options.data().form;
            this.$emit('update:visible', false);
            this.$emit('refreshList');
        }
    }
}
</script>

<style lang="scss">
.from_detail_div {
    width: 1000px;
}
</style>